Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[translation] adds docstrings and code snippets #17642

Merged
merged 11 commits into from
Mar 30, 2021

Conversation

kristapratico
Copy link
Member

Resolves #17046 #17047

@kristapratico kristapratico marked this pull request as ready for review March 29, 2021 19:23
Copy link
Contributor

@iscai-msft iscai-msft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really like your docstrings

:rtype: ~azure.core.polling.ItemPaged[JobStatusResult]
"""List all the submitted translation jobs under the Document Translation resource.

:keyword int top: Use top to indicate the total number of results you want
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my understanding was you guys weren't going to expose top and skip for this release, I could be wrong though

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

correct, will remove in future PR

this is sorted by descending start time.
:keyword int results_per_page: Use results_per_page to indicate the maximum number
of results returned in a page.
:return: ItemPaged[:class:`~azure.ai.documenttranslation.JobStatusResult`]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is ItemPaged rendering correctly in sphinx

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed. I think I had it like that to appease Apiview

use the default_version for the file format returned from the
:func:`~DocumentTranslationClient.get_glossary_formats()` client method.
:keyword str storage_source: Storage Source. Default value: "AzureBlob".
Currently only "AzureBlob" is supported.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you need to add ivars here? Idk if users would actually access the properties, but you can

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree that it's unlikely a user would access them, but will add :ivars: to be more complete

inner error with more descriptive details.
:ivar str status: Status for a job.

* `NotStarted` - the job has not begun yet.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A little out of this scope, but have you guys thought about making this an enum?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is only returned, never used as an input. If we made it an enum it would be purely for documentation purposes... last we had this conversation we decided that it should just be string.

@kristapratico kristapratico merged commit 41db0ef into Azure:master Mar 30, 2021
@kristapratico kristapratico deleted the dt-docstrings branch March 30, 2021 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[translation] update docstrings
3 participants